/*!
 * @file actionSet.cpp
 * @brief Ciało actionSet.hh
 */

#include "engine/cmd/actionSet.hh"
using namespace std;

/*--------------------------------------------------------------------------*/

actionSet::actionSet() :
	actionBase("set") {
}

/*--------------------------------------------------------------------------*/

void actionSet::doAction(std::string *array, int count, std::stringstream *ss) {

	if(count == 2){
		*ss << array[1] << " = " << pawirr::set->get(array[1])->s << endl;
	}
	else if(count == 3){
		pawirr::set->get(array[1])->set(array[2]);
		*ss << array[1] << " = " << array[2] << endl;
	}
}

/*--------------------------------------------------------------------------*/
